﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WPFHelper.Dialog2
{
    /// <summary>
    /// Interaction logic for WPFDialogControl.xaml
    /// </summary>
    public partial class WPFDialogControl : UserControl
    {
        public WPFDialogControl()
        {
            InitializeComponent();
        }

        private bool _Validated = false;
        
        public bool Validated
        {
            get
            {
                return _Validated;
            }
            protected internal set
            {
                if (value != _Validated)
                {
                    _Validated = value;
                    OnPropertyChanged("Validated");
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        protected internal void OnPropertyChanged(string name)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(name));
        }

    }
}
